package net.jsoft.pms.entity.dept;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "code_security_dept")
public class Dept implements Serializable
{

    /**
     * 
     */
    private static final long serialVersionUID = 3843755123841666604L;

    private long id;

    private String name;

    //    private Dept parentDept;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    //    @OneToMany(targetEntity = Dept.class, mappedBy = "parentDept", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    //    @JoinColumn(name = "parentDept")
    //    public Dept getParentDept()
    //    {
    //        return parentDept;
    //    }
    //
    //    public void setParentDept(Dept parentDept)
    //    {
    //        this.parentDept = parentDept;
    //    }

}
